package s05.polimorfismo;

public final class Boss extends Employee {

	private double weeklySalary;
	
	public Boss(String first, String last, double salary) {
		super(first, last);
		setWeeklySalary(salary);
	}

	public void setWeeklySalary(double salary) {
		weeklySalary = (salary > 0 ? salary : 0);
	}
	
	@Override
	public double earnings() {
		return weeklySalary;
	}
	
	public String toString() {
		return "Boss: "+ super.toString();
	}

}
